package com.xr.common.todo;

import java.util.List;

import com.bstek.dorado.data.db.DBStatement;
import com.bstek.dorado.utils.variant.VariantSet;


public class todo {
 
	private String onoffStationId="";
	DBStatement dbs = null;
 
	
	public void checkDeptManage() {

	}

	public String getSuperManageId(String oosId) {
		DBStatement dbs = new DBStatement();
		String manageId="";
		String sql="select d.manager_id from org_onoff_station oos,org_dept d where " +
				"oos.dept_id=d.dept_id and d.dr=0" +
				" start with oos.onoff_station_id="+oosId+" CONNECT BY PRIOR d.dept_id=d.super_dept_id ";
		dbs.setSql(sql);
		try {
			List list=dbs.queryForList();
			for(int i=0;i<list.size();i++){
				VariantSet vs=(VariantSet)list.get(i);
				manageId=vs.getString("manager_id");
				if(manageId==null || manageId.equals("")){
					break;
				} 
			} 
		} catch (Exception e) {
			e.printStackTrace();
		}
		 dbs.close();
		return manageId;
	}

	public void sendTodo() {
		DBStatement dbs = new DBStatement();
		
	}
    
	public void finishTodo() {

	}
	
	public void rejectTodo() {

	}
	
	
}
